<div class="alert alert-danger">
	<p>注意：</p>
	<p>1. 文章开启访问权限后将不在列表中显示，只能通过关键字或链接进入</p>
	<p>2. 无权访问的人将不会为分享者增加奖励</p>
	<p>3. 开启后请勾选有访问权限的等级</p>
</div>

<div class="form-group">
	<label class="col-sm-2 control-label">访问权限</label>
	<div class="col-sm-10 col-xs-12">
		<label class="radio-inline"><input type="radio" name="article_visit" value="0" {if empty($article['article_visit'])}checked="true"{/if}>关闭</label>
		<label class="radio-inline"><input type="radio" name="article_visit" value="1" {if !empty($article['article_visit'])}checked="true"{/if}> 开启</label>
	</div>
</div>

<div class="form-group">
	<label class="col-sm-2 control-label">会员等级</label>
	<div class="col-sm-10 col-xs-12">
		{loop $levels['member'] $level}
			<label class="checkbox-inline"><input type="checkbox" name="article_visit_level[member][]" value="{$level['id']}" {if in_array($level['id'], $article['article_visit_level']['member'] ? $article['article_visit_level']['member'] : array())}checked="checked"{/if}> {$level['levelname']}</label>
		{/loop}
	</div>
</div>


{if !empty($levels['commission'])}
<div class="form-group">
	<label class="col-sm-2 control-label">分销商等级</label>
	<div class="col-sm-10 col-xs-12">
		{loop $levels['commission'] $level}
			<label class="checkbox-inline"><input type="checkbox" name="article_visit_level[commission][]" value="{$level['id']}" {if in_array($level['id'], $article['article_visit_level']['commission'] ? $article['article_visit_level']['commission'] : array())}checked="checked"{/if}> {$level['levelname']}</label>
		{/loop}
	</div>
</div>
{/if}

<div class="form-group">
	<label class="col-sm-2 control-label">无权提示</label>
	<div class="col-sm-10 col-xs-12">
		<div class="input-group">
			<span class="input-group-addon">文字</span>
			<input class="form-control" value="{$article['article_visit_tip']['text']}" name="article_visit_tip[text]" placeholder="" />
		</div>
		<div class="help-block">无权访问时的提示文字，例如：您的等级无权访问</div>
	</div>
</div>

<div class="form-group">
	<label class="col-sm-2 control-label"></label>
	<div class="col-sm-10 col-xs-12">
		<div class="input-group">
			<span class="input-group-addon">链接</span>
			<input class="form-control" value="{$article['article_visit_tip']['link']}" id="noperm" name="article_visit_tip[link]" placeholder="" />
			<span data-input="#noperm" data-toggle="selectUrl" class="input-group-addon btn btn-default">选择链接</span>
		</div>
		<div class="help-block">无权访问时点击确认是跳转的链接，不填则跳转首页</div>
	</div>
</div>